<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>CSS3媒体查询 | Show Code</title><meta name="keywords" content="媒体查询"><meta name="author" content="const name='LSF'"><meta name="copyright" content="const name='LSF'"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="简介开发人员可以通过媒体查询的方式来定义浏览器在任何媒体环境中使用指定的 样式，比如：手机上的应用A的样式，PC的应用B的样式。 可以这样理解：在什么样的情况加载什么样的样式。 简单的媒体查询先来看一下这个例子： 1234h1&amp;#123;color:red&amp;#125;@media projrction&amp;#123;    body&amp;#123;background:yellow&amp;#125;&amp;#125;">
<meta property="og:type" content="article">
<meta property="og:title" content="CSS3媒体查询">
<meta property="og:url" content="https://www.frontblog.top/CSSMedia/index.html">
<meta property="og:site_name" content="Show Code">
<meta property="og:description" content="简介开发人员可以通过媒体查询的方式来定义浏览器在任何媒体环境中使用指定的 样式，比如：手机上的应用A的样式，PC的应用B的样式。 可以这样理解：在什么样的情况加载什么样的样式。 简单的媒体查询先来看一下这个例子： 1234h1&amp;#123;color:red&amp;#125;@media projrction&amp;#123;    body&amp;#123;background:yellow&amp;#125;&amp;#125;">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg">
<meta property="article:published_time" content="2021-08-24T06:54:22.000Z">
<meta property="article:modified_time" content="2021-08-24T08:29:48.153Z">
<meta property="article:author" content="const name&#x3D;&#39;LSF&#39;">
<meta property="article:tag" content="媒体查询">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://www.frontblog.top/CSSMedia/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><meta name="baidu-site-verification" content="bca62aafa83c929047096bcb43c5ce68"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script async="async" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script><script>(adsbygoogle = window.adsbygoogle || []).push({
  google_ad_client: 'ca-pub-7698107383427296',
  enable_page_level_ads: 'true'
});</script><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?bca62aafa83c929047096bcb43c5ce68";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-08-24 16:29:48'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><meta name="generator" content="Hexo 5.4.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="/img/ls.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">21</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">19</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url('https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Show Code</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">CSS3媒体查询</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2021-08-24T06:54:22.000Z" title="发表于 2021-08-24 14:54:22">2021-08-24</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2021-08-24T08:29:48.153Z" title="更新于 2021-08-24 16:29:48">2021-08-24</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h1><p>开发人员可以通过媒体查询的方式来定义浏览器在任何媒体环境中使用指定的 样式，比如：手机上的应用A的样式，PC的应用B的样式。</p>
<p>可以这样理解：在什么样的情况加载什么样的样式。</p>
<h1 id="简单的媒体查询"><a href="#简单的媒体查询" class="headerlink" title="简单的媒体查询"></a>简单的媒体查询</h1><p>先来看一下这个例子：</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="selector-tag">h1</span>&#123;<span class="attribute">color</span>:red&#125;</span><br><span class="line"><span class="keyword">@media</span> projrction&#123;</span><br><span class="line">    <span class="selector-tag">body</span>&#123;<span class="attribute">background</span>:yellow&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>在这段代码中，任何媒体中显示都是<code>h1</code>为红色，在打印的时候背景加上了黄色。<code>projrction</code>打印预览的情况下</p>
<h2 id="媒体类型"><a href="#媒体类型" class="headerlink" title="媒体类型"></a>媒体类型</h2><p>媒体类型主要是指媒介，就是你要显示的终端，以下列出几种媒体类型</p>
<p><strong>all</strong> – 全部媒体类型。</p>
<p>braille – 盲文触摸装置。</p>
<p>embossed – 分页盲文打印机。</p>
<p>handheld – 小屏幕和流量有限的手持设备（安装标准来说移动设备都应该使用这个介质类型，但是实际上安卓根本不理会这个介质，请使用 screen 结合媒体查      询语句使用）。</p>
<p><strong>print</strong> – 提供给打印机的样式，最常用的介质类型，打印页面时获得适合阅读的效果。</p>
<p>projection – 投影，给投影机使用。</p>
<p><strong>screen</strong> – 彩色屏幕，最常用的介质类型，一般和屏幕大小表达式联合使用。</p>
<p>speech – 语音朗诵，用于屏幕阅读软件。</p>
<p>tty – 固定间距字符网格，例如功能机那样的</p>
<p>tv – 智能电视设备。</p>
<h2 id="媒体描述符"><a href="#媒体描述符" class="headerlink" title="媒体描述符"></a>媒体描述符</h2><p>一个媒体描述符包含一个媒体类型和一个或多个媒体特性列表。其中特性描述符要放在圆括号中，如果没有媒体类型，那就运用到所有媒体上，因此下面两个事例是等效的</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">@media</span> all <span class="keyword">and</span> (<span class="attribute">min-resoluntion</span>:<span class="number">96dpi</span>)&#123;</span><br><span class="line">    <span class="selector-tag">body</span>&#123;<span class="attribute">background</span>:yellow&#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">@media</span> (<span class="attribute">min-resoluntion</span>:<span class="number">96dpi</span>)&#123;</span><br><span class="line">    <span class="selector-tag">body</span>&#123;<span class="attribute">background</span>:yellow&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>一般情况下，媒体特性描述符的格式类似于<code>css</code>中的一对属性和值。二者之间最大的区别是特性描述符可以不指定值，因此任何彩色媒体都符合（color）指定的条件，任何事色深为16位的彩色媒体，都符合（color:16）指定的条件，其实不指定值是在再做判断。</p>
<p>两个逻辑字符：</p>
<p>and：当有多个多个媒体描述符时候，需要使用and连接起来</p>
<p>not：对当前条件取反。</p>
<p>only：向后兼容</p>
<p>媒体描述符：</p>
<p>   <strong>width | min-width | max-width<br>   height | min-height | max-height<br>   device-width | min-device-width | max-device-width<br>   device-height | min-device-height | max-device-height<br>   aspect-ratio | min-aspect-ratio | max-aspect-ratio<br>   device-aspect-ratio | min-device-aspect-ratio | max-device-aspect-ratio<br>   color | min-color | max-color<br>   color-index | min-color-index | max-color-index<br>   monochrome | min-monochrome | max-monochrome<br>   resolution | min-resolution | max-resolution<br>   scan | grid</strong></p>
<h1 id="特性查询"><a href="#特性查询" class="headerlink" title="特性查询"></a>特性查询</h1><p>根据用户代理是否支持特定的css属性及其值来应用一段样式，这个功能称为特性查询。</p>
<p>简单来说就是如果你能识别并处理这个特性，那么你就是应用这段样式，否则跳过字段样式。如果用户代理不支持特性查询，那么整段样式都会跳过。</p>
<p>特性查询是渐进增强样式的完美方法，比如说你想在浮动布局之外增加栅格布局，可以保留现有的布局方法，在样式表中添加下面这段样式。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">@supports(display:grid)&#123;</span><br><span class="line">    <span class="selector-tag">section</span><span class="selector-id">#main</span>&#123;<span class="attribute">display</span>:grid;&#125;</span><br><span class="line">    <span class="comment">/* 去掉旧样式*/</span></span><br><span class="line">     <span class="comment">/* 新增新样式*/</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>一个特性查询中可以使用多个逻辑运算符，但是为了保证条理清晰，要使用括号。假如我们想在支持颜色的同时，还支持栅格或弹性盒布局中的一个时应用一段样式可以这样写。</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">@supports(color:red) and ((display:grid) or (display:flex))&#123;</span><br><span class="line">    </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<blockquote>
<p>TIP：判断支持栅格或盒布局的查询放在一对括号里，必须这么做，如若不然，整个表达式都将失效，块中样式也会跳过</p>
</blockquote>
<h1 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h1><p>媒体查询和特性查询都是根据着什么条件来渲染指定的样式表，媒体查询主要分为媒体类型和媒体描述符，特性查询主要是根据特性来决定，一般往往是K-V值出现的</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined" rel="external nofollow noreferrer">const name='LSF'</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="https://www.frontblog.top/CSSMedia/">https://www.frontblog.top/CSSMedia/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="external nofollow noreferrer" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="https://www.frontblog.top" target="_blank">Show Code</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E5%AA%92%E4%BD%93%E6%9F%A5%E8%AF%A2/">媒体查询</a></div><div class="post_share"><div class="social-share" data-image="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button button--animated"><i class="fas fa-qrcode"></i> 打赏</div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/img/wechat.jpg" target="_blank"><img class="post-qr-code-img" src="/img/wechat.jpg" alt="wechat"/></a><div class="post-qr-code-desc">wechat</div></li></ul></div></div><nav class="pagination-post" id="pagination"><div class="next-post pull-full"><a href="/mongodb/"><img class="next-cover" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="onerror=null;src='/img/404.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">使用Docker方式安装mongodb数据库</div></div></a></div></nav><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="/img/ls.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">const name='LSF'</div><div class="author-info__description">人生就像品茶，懂得吃苦，才能回甘啊。</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">21</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">19</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener external nofollow noreferrer" href="https://gitee.com/lsfcxz"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://gitee.com/lsfcxz" rel="external nofollow noreferrer" target="_blank" title="Gitee"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:1770813141@qq.com" rel="external nofollow noreferrer" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">人生就像品茶，懂得吃苦，才能回甘啊。</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%AE%80%E4%BB%8B"><span class="toc-number">1.</span> <span class="toc-text">简介</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%AE%80%E5%8D%95%E7%9A%84%E5%AA%92%E4%BD%93%E6%9F%A5%E8%AF%A2"><span class="toc-number">2.</span> <span class="toc-text">简单的媒体查询</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AA%92%E4%BD%93%E7%B1%BB%E5%9E%8B"><span class="toc-number">2.1.</span> <span class="toc-text">媒体类型</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%AA%92%E4%BD%93%E6%8F%8F%E8%BF%B0%E7%AC%A6"><span class="toc-number">2.2.</span> <span class="toc-text">媒体描述符</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%89%B9%E6%80%A7%E6%9F%A5%E8%AF%A2"><span class="toc-number">3.</span> <span class="toc-text">特性查询</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#%E5%B0%8F%E7%BB%93"><span class="toc-number">4.</span> <span class="toc-text">小结</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/CSSMedia/" title="CSS3媒体查询"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="CSS3媒体查询"/></a><div class="content"><a class="title" href="/CSSMedia/" title="CSS3媒体查询">CSS3媒体查询</a><time datetime="2021-08-24T06:54:22.000Z" title="发表于 2021-08-24 14:54:22">2021-08-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/mongodb/" title="使用Docker方式安装mongodb数据库"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="使用Docker方式安装mongodb数据库"/></a><div class="content"><a class="title" href="/mongodb/" title="使用Docker方式安装mongodb数据库">使用Docker方式安装mongodb数据库</a><time datetime="2021-07-12T12:21:57.000Z" title="发表于 2021-07-12 20:21:57">2021-07-12</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/cicd/" title="实现CICD平台"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="实现CICD平台"/></a><div class="content"><a class="title" href="/cicd/" title="实现CICD平台">实现CICD平台</a><time datetime="2021-07-12T10:14:05.000Z" title="发表于 2021-07-12 18:14:05">2021-07-12</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/nosql/" title="NoSQL设计"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="NoSQL设计"/></a><div class="content"><a class="title" href="/nosql/" title="NoSQL设计">NoSQL设计</a><time datetime="2021-07-12T08:07:59.000Z" title="发表于 2021-07-12 16:07:59">2021-07-12</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/email/" title="阿里云邮箱配置问题"><img src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="阿里云邮箱配置问题"/></a><div class="content"><a class="title" href="/email/" title="阿里云邮箱配置问题">阿里云邮箱配置问题</a><time datetime="2021-07-11T15:36:07.000Z" title="发表于 2021-07-11 23:36:07">2021-07-11</time></div></div></div></div><div class="card-widget ads-wrap"><script data-ad-client="ca-pub-7698107383427296" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script></div></div></div></main><footer id="footer" style="background-image: url('https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/img/default.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2021 By const name='LSF'</div><div class="footer_custom_text"><a target="_blank" rel="noopener external nofollow noreferrer" href="https://beian.miit.gov.cn/"><img class="icp-icon" src="/img/icp.png"><span>粤ICP备2021029106号</span></a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="chat_btn" type="button" title="rightside.chat_btn"><i class="fas fa-sms"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())</script><div class="js-pjax"><script>function loadValine () {
  function initValine () {
    let initData = {
      el: '#vcomment',
      appId: 'w6Gw4UqYW4lsKyVlK45T98xo-gzGzoHsz',
      appKey: '9hvrOAKzIWScQU8OSxWiO5L0',
      placeholder: '記得留下你的暱稱和郵箱....可以快速收到回復',
      avatar: 'monsterid',
      meta: 'nick,mail,link'.split(','),
      pageSize: '10',
      lang: 'zh-CN',
      recordIP: false,
      serverURLs: '',
      emojiCDN: '',
      emojiMaps: "",
      enableQQ: false,
      path: window.location.pathname,
    }

    if (true) { 
      initData.requiredFields= ('nick,mail'.split(','))
    }
    
    if (false) {
      const otherData = false
      initData = Object.assign(initData, otherData)
    }
    
    const valine = new Valine(initData)
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js').then(initValine)
}

if ('Valine' === 'Valine' || !false) {
  if (false) btf.loadComment(document.getElementById('vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script></div><script id="canvas_nest" defer="defer" color="0,0,255" opacity="0.7" zIndex="-1" count="99" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-nest.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = true;
POWERMODE.mobile = false;
document.body.addEventListener('input', POWERMODE);
</script><script async data-pjax src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>